<layout name="layout" />

<script src="{$uri}Public/Scripts/PSI/CodeTable/RuntimeMainForm.js?dt={$dtFlag}" type="text/javascript"></script>

<script src="{$uri}Public/Scripts/PSI/CodeTable/RuntimeEditForm.js?dt={$dtFlag}" type="text/javascript"></script>
<!--
  上级字段
    TODO：因为不是每个码表都是层级结构，所以这个地方需要优化一下JS的冗余引用
-->
<script src="{$uri}Public/Scripts/PSI/CodeTable/CodeTableParentIdField.js?dt={$dtFlag}" type="text/javascript"></script>

<!--
  码表记录引用字段
    TODO：这个地方需要优化一下JS的冗余引用
-->
<script src="{$uri}Public/Scripts/PSI/CodeTable/CodeTableRecordRefField.js?dt={$dtFlag}"
  type="text/javascript"></script>

<script>
  Ext.onReady(function () {
    PSI.Const.PROD_NAME = "{$productionName}";

    var app = Ext.create("PSI.App", {
      userName: "{$loginUserName}",
      productionName: "{$productionName}",
      appHeaderInfo: {
        title: "{$title}"
      }
    });

    app.add(Ext.create("PSI.CodeTable.RuntimeMainForm", {
      fid: "{$fid}"
    }));
  });
</script>
